package com.tanhua.util;

import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;

import java.util.HashMap;

public class JwtsUtils {
    public static String getJwts(String phone,Long id,String secret){

        HashMap<String, Object> map = new HashMap<>();
        map.put("phone",phone );
        map.put("id",id );
        return Jwts.builder().setClaims(map).signWith(SignatureAlgorithm.HS256, secret).compact();
    }
}
